/*
*	
*/
(function($){
	$.fn.hilight=function(options){
		alert(options);
		//建立主要选项在元素迭代之前
		var opts = $.extend({},$.fn.hilight.defaults,options);
		//迭代和重新格式化每个匹配的元素
		//alert(opts.foreground+"--"+opts.background);
		return this.each(function(){
			$this = $(this);
			var o = $.extend({},opts,$this.data());
			$this.css({
				backgroundColor:o.background,
				color:o.foreground
			});
			var t = $this.html();
			t = $.fn.hilight.format(t);
			$this.html(t);
		});
	}
	$.fn.hilight.defaults={
		foreground:"red",
		background:"gray"
	};
	$.fn.hilight.format=function(txt){
		return "<strong>"+txt+"</strong>";
	}
})(jQuery)